using NUnit.Framework;

// ReSharper disable InconsistentNaming
namespace NFreeMarker.Tests.Template
{
    public class TemplateTests_ProcessStringOperations
    {
        [TestFixture]
        public class When_processing_a_string_concatenation_with_two_empty_strings : TemplateTestsBase
        {
            [Test]
            public void Assure_the_resulting_string_is_empty()
            {
                SetTemplateContent("${strA + strB}");
                AddTemplateVariable("strA", "");
                AddTemplateVariable("strB", "");

                string output = ProcessTemplate();

                Assert.That(output, Is.EqualTo(""));
            }
        }

        [TestFixture]
        public class When_processing_a_string_concatenation_with_two_non_empty_strings : TemplateTestsBase
        {
            [Test]
            public void Assure_the_resulting_string_is_the_two_strings_added_together()
            {
                SetTemplateContent("${strA + strB}");
                AddTemplateVariable("strA", "AB");
                AddTemplateVariable("strB", "CD");

                string output = ProcessTemplate();

                Assert.That(output, Is.EqualTo("ABCD"));
            }
        }
    }
}
// ReSharper enable InconsistentNaming
